﻿#ifndef TOOLBARMEASURE_H
#define TOOLBARMEASURE_H
#include "MeasureView_global.h"
#include <QToolBar>

namespace Qly
{
class MeasureView;

class MEASUREVIEW_EXPORT ToolBarMeasure : public QToolBar
{
    Q_OBJECT
public:
    ToolBarMeasure(const QString &title, QWidget *parent = Q_NULLPTR);
    ToolBarMeasure(QWidget *parent = Q_NULLPTR);
    void attach(MeasureView *widget);
    void attach(QMenu *pMenu);
public slots:
    void uncheckAll();
signals:
    void checked();
private:
    void initAction();

private slots:
    void upateDrawType(bool on);
public:
    QActionGroup *actionGroup;
    QAction *actionSelect;
    QAction *actionDelete;
    QAction *actionLine;

    QAction *actionParallel;
    QAction *actionRCircle;
    QAction *actionLCircle;
    QAction *actionCircle2Circle;
    QAction *actionRect;
    QAction *actionAngle;
    QAction *actionAngle2;
    QAction *actionArc;
    QAction *actionPolyline;
    QAction *actionPolygon;
    QAction *actionPCircle;
    QAction *actionDots2Line;
    QAction *actionCount;

    QAction *actionShowDialogMeasure;

    MeasureView *pMeasure;
};
} // namespace Qly
#endif // TOOLBARMEASURE_H
